﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
		var items = [{
		width:'97%',
		border:false,
		layout:'form',
		autoHeight:true,
		xtype:'container',
		style:'padding:5 10 5 10;',
		items:[{
			anchor:'100%',
			border:false,
			xtype:'container',
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				xtype:'container',
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'材料名称', name:'price_info__mat_name', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:150},
					{xtype:'textfield', fieldLabel:'规格型号', name:'price_info__mat_size', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'产地', name:'price_info__mat_factory', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'材质', name:'price_info__mat_stuff', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'联系人', name:'price_info__contact_person', anchor:'100%', maxLength:50},
					{xtype:'trigger', fieldLabel:'材料类别', name:'price_info__mat_type',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:50, editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'mat_type', layoutPage:'/public/layout/layout_tree.js', sourceField:'', targetField:'', whereSql:"", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'price_info.mat_type'};
							JxSelect.createSelectWin(selcfg, this, 'node_price_info_form');
						}},
					{xtype:'textfield', fieldLabel:'上传人', name:'price_info__upload_user', defaultval:'fun_getUserName()', anchor:'100%', maxLength:50},
					{xtype:'hidden', fieldLabel:'上传人id', name:'price_info__upload_userid', defaultval:'fun_getUserId()', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主键', name:'price_info__price_info_id', anchor:'100%'}
				]
			},{
				border:false,
				xtype:'container',
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'单位', name:'price_info__mat_unit', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:10},
					{xtype:'numberfield', allowDecimals:false, fieldLabel:'单价（元）', name:'price_info__mat_price', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:12},
					{xtype:'textfield', fieldLabel:'供应商', name:'price_info__mat_provider', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'联系电话', name:'price_info__tel_number', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'类别编码', name:'price_info__type_code', anchor:'100%', maxLength:50},
					{xtype:'trigger', fieldLabel:'上传单位', name:'price_info__dept_name', defaultval:'fun_getDeptName()',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:50, editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'sys_dept', layoutPage:'/public/layout/layout_tree.js', sourceField:'', targetField:'', whereSql:"", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'price_info.dept_name'};
							JxSelect.createSelectWin(selcfg, this, 'node_price_info_form');
						}},
					{xtype:'datefield', fieldLabel:'上传日期', name:'price_info__upload_date', format:'Y-m-d', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'部门id', name:'price_info__dept_id', defaultval:'fun_getDeptId()', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'类别id', name:'price_info__mat_type_id', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border:false,
			xtype:'container',
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				xtype:'container',
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textfield', fieldLabel:'品牌', name:'price_info__mat_brand', anchor:'100%', maxLength:100},
					{xtype:'textarea', fieldLabel:'使用项目', name:'price_info__project_name', width:'100%', height:48, maxLength:500},
					{xtype:'textfield', fieldLabel:'备注', name:'price_info__memo', anchor:'100%', maxLength:200}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'price_info'
	};

	
	
	
	return new Jxstar.FormNode(config);
}